<?php
	require_once("db_connection.php");
	
	$data = array();
	
	if(mysql_num_rows($result=mysql_query("SELECT destination FROM airportrate WHERE affiliateid = '$_POST[search]' GROUP BY destination"))){
		while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
			$data[] = array(
				0 => $row['destination'] ,
				1 => '|'
			);
		}
	}
	
	echo json_encode($data);
	flush();
?>